package o;

import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Locale;

public class euz {
    public static boolean ˊ(String str, String str2, String str3) throws NoSuchAlgorithmException, InvalidKeySpecException {
        return ˋ(str, str3).equals(str2);
    }

    public static String ˋ(String str, String str2) throws NoSuchAlgorithmException, InvalidKeySpecException {
        return ॱ(doj.ˎ(str.toCharArray(), ˊ(str2)));
    }

    public static String ˏ() throws NoSuchAlgorithmException {
        return ॱ(evh.ˎ());
    }

    private static byte[] ˊ(String str) {
        byte[] bArr = new byte[(str.length() / 2)];
        for (int i = 0; i < bArr.length; i++) {
            bArr[i] = (byte) Integer.parseInt(str.substring(i * 2, (i * 2) + 2), 16);
        }
        return bArr;
    }

    private static String ॱ(byte[] bArr) {
        String bigInteger = new BigInteger(1, bArr).toString(16);
        int length = (bArr.length * 2) - bigInteger.length();
        if (length <= 0) {
            return bigInteger;
        }
        return String.format(Locale.ENGLISH, "%0" + length + "d", new Object[]{Integer.valueOf(0)}) + bigInteger;
    }
}
